# Copyright 2016, Data61, CSIRO (ABN 41 687 119 230)
#
# SPDX-License-Identifier: BSD-2-Clause

{{if header_mode}}
    #ifndef _RPC_INTERFACE_{{ifname.upper()}}_{{'CLIENT' if client_mode else 'SERVER'}}_H_\n
    #define _RPC_INTERFACE_{{ifname.upper()}}_{{'CLIENT' if client_mode else 'SERVER'}}_H_\n\n
{{endif}}

{{for include in includes}}
    {{include}}\n
{{endfor}}
{{if not header_mode}}
    #include <stdint.h>\n
    #include <stdlib.h>\n
{{endif}}
\n\n

/*! @file\n
____@brief Generated file for the {{ifname}} interface. Please do NOT edit this file. */\n\n

{{if header_mode}}
    #ifndef _RPC_{{ifname.upper()}}_LABEL_ENUMS_\n
    #define _RPC_{{ifname.upper()}}_LABEL_ENUMS_\n
    /*! @brief RPC syscall label enums for {{ifname}} interface. */\n
    enum rpc_{{ifname}}_label_enum {\n
    ____RPC_{{ifname.upper()}}_LABEL_MIN = {{label_min}},\n

        {{for enum_entry in enum_list}}
        ____{{enum_entry}}\n
        {{endfor}}

    ____RPC_{{ifname.upper()}}_LABEL_MAX\n
    };\n
    #endif\n\n
{{endif}}

{{for func_output in func_list}}
    {{func_output}}\n
{{endfor}}

{{if header_mode}}
    #endif /* _RPC_INTERFACE_{{ifname.upper()}}_{{'CLIENT' if client_mode else 'SERVER'}}_H_ */\n
{{endif}}
